<template>
	<view class="flex-row" style="width: 96vw;margin: 1px;justify-content: space-around;">
		<view class="myrect flex-column" :class="index == selectDay ? 'bg-blue':'bg-dgrey'"
			style="width: 17%;margin: 1px;" v-for="(day,index) in days" :key='index'>
			<text>{{day.day}}</text>
			<text>{{day.date}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {

		},
		data() {
			return {
				cnWeeks: ['周日', '周一', '周二', '周三', '周四', '周五', '周六', ],
				cnmonths: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', ],
				enWeeks: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', ],
				enmonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec', ],
				dates: [],
			};
		},
		methods: {
			getCurrentDate: function(n) {
				var dd = new Date();
				if (n) {
					dd.setDate(dd.getDate() - n);
				}
				var year = dd.getFullYear();
				var month =
					dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1;
				var day = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
				var date = month + "-" + day
				var date2 = year + '-' + month + "-" + day
				var day2 = dd.getDay()
				return [date, day2, date2];
			},
		},
		computed: {
			BeginTitle() {
				let value = '未选择';
				if (this.checkeds.length) value = DateTools.format(this.checkeds[0], 'yy/mm/dd');
				return value;
			},
			EndTitle() {
				let value = '未选择';
				if (this.checkeds.length == 2) value = DateTools.format(this.checkeds[1], 'yy/mm/dd');
				return value;
			},
			PickerTimeTitle() {
				return DateTools.formatTimeArray(this.timeValue, this.showSeconds);
			},
			BeginTimeTitle() {
				return this.BeginTitle != '未选择' ? DateTools.formatTimeArray(this.beginTime, this.showSeconds) : '';
			},
			EndTimeTitle() {
				return this.EndTitle != '未选择' ? DateTools.formatTimeArray(this.endTime, this.showSeconds) : '';
			}
		},
	}
</script>

<style>
	.flex-row {
		display: flex;
		flex-direction: row;
		align-content: center;
		align-items: center;
	}

	.bg-blue {
		background-color: #3879F1;
		color: #ffffff;
	}

	.bg-dgrey {
		background: #f5f5f5;
		text-align: center;
	}
</style>
